<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use MQ\Model\TopicMessage;
use MQ\MQClient;
use Enforcer;

class Task extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'task';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = '创建任务';
    protected $client=null;

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {

        //创建打包任务
        echo json_encode([
            "CMD"=>"LANDERPCPACK",
            'mch_id'=>100,
            "game_id"=>1002,
            'channel_id'=>100234,
            'title'=>"沙城登陆器",
            'version'=>'1.3.6',
            'skin_url'=>'https://shacheng-build.oss-cn-chengdu.aliyuncs.com/skin/2255.skin',
            'upload_config'=>[
                'driver'=>'oss',
                'AccessKey_ID'=>'111',
                'AccessKey_Secret'=>'222',
                'Bucket'=>"shacheng-build",
                'uploadPath'=>'/pack/pc/1002/1.3.6',
                'endpoint'=>''
            ],
            'callback_url'=>url('test')
        ],JSON_UNESCAPED_UNICODE);
        exit;
    }
}
